1. Field of the Invention
The present invention relates to Cache refresh, and more particularly, to background cache refresh of social data based on user behavior.
2. Description of the Related Art
The evolution of social interaction and social sites has brought about great changes in the way users interact. Some of the social sites have seen meteoric rise in the amount of interactive traffic while others have shown modest growth. Each of the social sites provides varied forms of interaction. A user having accounts in multiple social sites, such as Facebook, Twitter, etc., accesses the information by logging into these sites or subscribing for feed from these sites on a periodic basis. In order to reduce the burden on the users of visiting all the sites to get their social feeds periodically, some sites, such as Yahoo, provide options to the user to link his/her accounts from these third party sites, such as Facebook®, Twitter®, etc., to their Yahoo account so that the user can receive the “social feeds” from these third party sites in one place. The sites then present the feeds to the users with appropriate links. As a result, when a user accesses their default account (for e.g., Yahoo account), the user notices his/her social feeds or a list of events pertaining to their contacts in their social network in their default account obtained from the other third party sites.
One way sites, such as Yahoo, obtain the social feeds from the third party sites is by querying those sites when users arrive at the default account. The problem with this approach is that the third party sites may have erratic latencies, sometimes averaging between tens of milliseconds to tens of seconds. Such latencies delay the receiving of the social feeds thereby degrading user's social interaction experience leading to user's disinterest in the sites. To address the latencies, sites, such as Yahoo, maintain a local cache of social data (e.g., event feeds related to friends) gathered from the third party sites. In particular, the sites maintain a separate cache line for each (user, third party) pair where the user has linked their site account to the third party. The sites use and maintain this cache using a strategy known as “serve stale and refresh.” According to this strategy, when a user arrives at the site and queries for the latest events pertaining to their social contacts, the site serves whatever is stored in cache for the (user, third party) pair, and asynchronously updates the cache line for this (user, third party) pair by simultaneously querying the third party site to refresh the cache so that subsequent requests of the feed are fresh.
There are some drawbacks with the “serve stale and refresh” strategy. For instance, this strategy is tied to a user's query pattern. As a result, the cache line may contain social data that may be very old and out-of-date. The cache line can be as old as the last time the user requested his/her feed that triggered a cache refresh. The last time the user requested the feed could range from few hours to few days. To avoid the staleness of the social data, one can proactively refresh the cache periodically. However, the proactive refresh may employ naïve strategies leading to wasteful resources and time.
It would be advantageous to employ a refresh strategy that utilizes optimal resources while providing a more up-to-date social data feed for a user in an efficient and effective way irrespective of when the user visited the site and requested the social data feed.
It is in this context that the embodiments of the invention arise.